from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep


try:
    driver = webdriver.Chrome()
    driver.get('https://www.baidu.com')

    driver.find_element_by_id('kw').send_keys('高考')
    
    driver.find_element(by=By.ID,value='su').click()
except Exception as e:
    print(e)
finally:
    sleep(4)
    driver.close()